﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Photography
{
    public partial class Main : System.Web.UI.Page
    {
        protected new SiteMaster Master { get { return base.Master as SiteMaster; } }

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void GetGalleryPhotos(object sender, LinqDataSourceSelectEventArgs e)
        {
            Photography.App_Data.PhotographyDataContext context = new Photography.App_Data.PhotographyDataContext();
            e.Result = context.GetGalleryPhotos(Master.Categories[Master.CurrentCategoryId].MainGalleryID);
        }

        protected void GetGalleries(object sender, LinqDataSourceSelectEventArgs e)
        {
            Photography.App_Data.PhotographyDataContext context = new Photography.App_Data.PhotographyDataContext();
            e.Result = context.GetGalleries(Master.CurrentCategoryId);
        }
    }
}